import { request } from '@/utils/request.js'

/**
 * 轮播图管理 API接口
 */
export default {

  /**
   * 数据列表
   * @returns
   */
  getPageList(params = {}) {
    return request({
      url: '/admin/market/banner/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加数据
   * @returns
   */
  save(params = {}) {
    return request({
      url: '/admin/market/banner/save',
      method: 'post',
      data: params
    })
  },

  /**
   * 更新数据
   * @returns
   */
  update(params = {}) {
    return request({
      url: '/admin/market/banner/update',
      method: 'put',
      data: params
    })
  },

  /**
   * 读取数据
   * @returns
   */
  read(id) {
    return request({
      url: '/banner/admin/MarketBanner/read?id=' + id,
      method: 'get'
    })
  },

  /**
   * 删除数据
   * @returns
   */
  destroy(data) {
    return request({
      url: '/admin/market/banner/destroy',
      method: 'delete',
      data
    })
  },
  // 首页导航列表
  getNavList() {
    return request({
      url: '/admin/market/entrance/index',
      method: 'get'
    })
  },
  // 添加首页导航
  addNav(data) {
    return request({
      url: '/admin/market/entrance/save',
      method: 'post',
      data
    })
  },
  // 编辑首页导航
  updateNav(data) {
    return request({
      url: '/admin/market/entrance/update',
      method: 'put',
      data
    })
  },
  // 删除首页导航
  destroyNav(data) {
    return request({
      url: '/admin/market/entrance/destroy',
      method: 'delete',
      data
    })
  },
  // 公告列表
  getNoticeList() {
    return request({
      url: '/admin/market/notice/index',
      method: 'get'
    })
  },
  // 添加系统公告
  addNotice(data) {
    return request({
      url: '/admin/market/notice/save',
      method: 'post',
      data
    })
  },
  // 编辑系统公告
  updateNotice(data) {
    return request({
      url: '/admin/market/notice/update',
      method: 'put',
      data
    })
  },
  // 删除系统公告
  destroyNotice(data) {
    return request({
      url: '/admin/market/notice/destroy',
      method: 'delete',
      data
    })
  },
  // 观看记录
  WatchLogList(params = {}) {
    return request({
      url: '/admin/data/lookLogList',
      method: 'post',
      data: params
    })
  },
  // 签到记录
  SignInLogList(params = {}) {
    return request({
      url: '/admin/data/signLogList',
      method: 'post',
      data: params
    })
  },
  // 红包记录
  RedPacketLogList(params = {}) {
    return request({
      url: '/admin/data/redLogList',
      method: 'post',
      data: params
    })
  },
  // 资金流水
  FundLogList(params = {}) {
    return request({
      url: '/admin/data/balanceLogList',
      method: 'post',
      data: params
    })
  },
  // 点名记录
  CallRecordList(params = {}) {
    return request({
      url: '/admin/data/callRollList',
      method: 'post',
      data: params
    })
  },
  // 点名详细记录
  CallRecordDetail(params = {}) {
    return request({
      url: '/admin/data/callRollLogList',
      method: 'post',
      data: params
    })
  },
}